class CreateBudgetLines < ActiveRecord::Migration
  def self.up
    create_table :budget_lines do |t|
      t.string      :itemName,    :null => false
      t.integer     :qtd,         :null => false, :default => 1
      t.decimal     :price,     :precision  =>  8,    :scale  =>  2

      t.integer     :budget_id,   :null => false, 
                    :options  =>  "CONSTRAINT fk_budget_line_budget references budgets(id)"
      t.timestamps
    end
  end

  def self.down
    drop_table :budget_lines
  end
end
